
package CCT220_Trabalho04_13106.model;


import java.io.Serializable;
import java.util.Vector;


/**
 * </br>******************************
 * </br>Project: CCT220
 * </br>Package: CCT220_Trabalho04_13106.model
 * </br>Class: Turma
 * </br>Last Change: 08/10/2011 11:25:37 by marcel
 * </br>Description: Entity of Turma
 * </br>******************************</br>
 * 
 * @author marcel
 * @author 13106
 * 
 */
public class Turma implements Serializable {

	/**
	 * long
	 */
	private static final long serialVersionUID = 3L;
	/**
	 * int
	 */
	private int               codigoTurma;
	/**
	 * String
	 */
	private String            nomeTurma;
	/**
	 * Disciplina
	 */
	private Disciplina        disciplina;
	/**
	 * Vector<Estudante>
	 */
	private Vector<Estudante> listaEstudante;


	/**
	 * </br>******************************
	 * </br>Constructor for
	 * </br>Package: CCT220_Trabalho04_13106.model
	 * </br>Class: Turma
	 * </br>LastChange: 08/10/2011 11:25:39 by marcel
	 * </br>******************************</br>
	 * 
	 * @param codigoTurma
	 * @param nomeTurma
	 * @param disciplina
	 * @param listaEstudante
	 */
	public Turma(int codigoTurma, String nomeTurma, Disciplina disciplina,
	        Vector<Estudante> listaEstudante) {

		super();
		this.codigoTurma = codigoTurma;
		this.nomeTurma = nomeTurma;
		this.disciplina = disciplina;
		this.listaEstudante = listaEstudante;
	}


	/**
	 * </br>******************************
	 * </br>Package: CCT220_Trabalho04_13106.model
	 * </br>Class: Turma
	 * </br>Method: getCodigoTurma
	 * </br>Last Change: 08/10/2011 11:25:43 by marcel
	 * </br>Description: Getter for codigoTurma
	 * </br>******************************</br>
	 * 
	 * @return codigoTurma
	 */
	public int getCodigoTurma() {

		return codigoTurma;
	}


	/**
	 * </br>******************************
	 * </br>Package: CCT220_Trabalho04_13106.model
	 * </br>Class: Turma
	 * </br>Method: getNomeTurma
	 * </br>Last Change: 08/10/2011 11:25:45 by marcel
	 * </br>Description: Getter for nomeTurma
	 * </br>******************************</br>
	 * 
	 * @return nomeTurma
	 */
	public String getNomeTurma() {

		return nomeTurma;
	}


	/**
	 * </br>******************************
	 * </br>Package: CCT220_Trabalho04_13106.model
	 * </br>Class: Turma
	 * </br>Method: getDisciplina
	 * </br>Last Change: 08/10/2011 11:25:47 by marcel
	 * </br>Description: Getter for disciplina
	 * </br>******************************</br>
	 * 
	 * @return disciplina
	 */
	public Disciplina getDisciplina() {

		return disciplina;
	}


	/**
	 * </br>******************************
	 * </br>Package: CCT220_Trabalho04_13106.model
	 * </br>Class: Turma
	 * </br>Method: getListaEstudante
	 * </br>Last Change: 08/10/2011 11:25:48 by marcel
	 * </br>Description: Getter for listaEstudantes
	 * </br>******************************</br>
	 * 
	 * @return listaEstudantes
	 */
	public Vector<Estudante> getListaEstudante() {

		return listaEstudante;
	}


	/**
	 * </br>******************************
	 * </br>Package: CCT220_Trabalho04_13106.model
	 * </br>Class: Turma
	 * </br>Method: setCodigoTurma
	 * </br>Last Change: 08/10/2011 11:25:50 by marcel
	 * </br>Description: Setter for codigoTurma
	 * </br>******************************</br>
	 * 
	 * @param codigoTurma
	 *            to set the codigoTurma
	 */
	public void setCodigoTurma(int codigoTurma) {

		this.codigoTurma = codigoTurma;
	}


	/**
	 * </br>******************************
	 * </br>Package: CCT220_Trabalho04_13106.model
	 * </br>Class: Turma
	 * </br>Method: setNomeTurma
	 * </br>Last Change: 08/10/2011 11:25:53 by marcel
	 * </br>Description: Setter for nomeTurma
	 * </br>******************************</br>
	 * 
	 * @param nomeTurma
	 *            to set the nomeTurma
	 */
	public void setNomeTurma(String nomeTurma) {

		this.nomeTurma = nomeTurma;
	}


	/**
	 * </br>******************************
	 * </br>Package: CCT220_Trabalho04_13106.model
	 * </br>Class: Turma
	 * </br>Method: setDisciplina
	 * </br>Last Change: 08/10/2011 11:25:55 by marcel
	 * </br>Description: Setter for disciplina
	 * </br>******************************</br>
	 * 
	 * @param disciplina
	 *            to set the disciplina
	 */
	public void setDisciplina(Disciplina disciplina) {

		this.disciplina = disciplina;
	}


	/**
	 * </br>******************************
	 * </br>Package: CCT220_Trabalho04_13106.model
	 * </br>Class: Turma
	 * </br>Method: setListaEstudante
	 * </br>Last Change: 08/10/2011 11:25:57 by marcel
	 * </br>Description: Setter for listaEsturante
	 * </br>******************************</br>
	 * 
	 * @param listaEstudante
	 *            to set the listaEstudante
	 */
	public void setListaEstudante(Vector<Estudante> listaEstudante) {

		this.listaEstudante = listaEstudante;
	}


	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {

		String str = "\nTurma :" + "\n   +codigo: " + codigoTurma
		        + "\n   +nome: " + nomeTurma
		        + "\n   +disciplina: \n      codigo: " + disciplina.getCodigo()
		        + "\n      nome: " + disciplina.getNome()
		        + "\n   +lista estudantes:";
		for (int i = 0; i < listaEstudante.size(); i++) {
			str += "\n    +estudante\n      codigo: "
			        + listaEstudante.get(i).getCodigo() + "\n      nome: "
			        + listaEstudante.get(i).getNome();
		}
		return str;
	}

}
